import Vue from 'vue'
import Router from 'vue-router'
import Login from "@/components/Login"
import Indexs from "@/components/Indexs" 
import Shangpu from "@/components/shangpu"
import Zhuye from "@/components/Zhuye"
import Zhuce from "@/components/Zhuce"
import Baobeishoucang from "@/components/Baobeishoucang"
import Shoucang from "@/components/Shoucang"
import Zhuyeshangpu from "@/components/Zhuyeshangpu"
import Shangpuinfo from "@/components/shangpuinfo"
import Shangpuzhuye from "@/components/shangpuzhuye"
import Danpin from "@/components/danpin"
import Sousuos from "@/components/Sousuos"
import Sousuosps from "@/components/sousuosps"
import Geren from "@/components/geren"
import Grindex from "@/components/grindex"
import Grziliao from "@/components/grziliao"
import Dzxg from "@/components/dizhixg"
import Dianpushoucang from "@/components/Dianpushoucang"
import Gwche from "@/components/gouwuche"
import Houtai from "@/components/houtai"
import Tjspin from "@/components/tianjiashangpin"
import Tjspu from "@/components/tianjiashangpu"
import Llyh from "@/components/liulanyonghu"
import Hdlogin from "@/components/htlogin"
import Xgdp from "@/components/xgdp"
import Dpyilan from "@/components/dpyls"
import Gc from "@/components/gaicuo"

Vue.use(Router)

export default new Router({
  routes: [
    {
      path:"/",
      component:Indexs,
      children:[
        {
          path:"/",
          component:Zhuye,
          children:[
            {
              path:'/',
              component:Zhuyeshangpu
            }
          ]
        },
        {
          path:'/shoucang',
          name:"shoucang",
          component:Shoucang,
          children:[
            {
              path:'bb',
              name:"shoucang",
              component:Baobeishoucang,
            },
            {
              path:'dp',
              name:"shoucangdp",
              component:Dianpushoucang,
            },
          ]
        },
        {
          path:"shangpu/:id",
          name:"shangpu",
          component:Shangpu,
          children:[
            {
              path:"",
              component:Shangpuzhuye,
              children:[
                {
                  path:"",
                  name:"shangpu",
                  component:Shangpuinfo
                },
                // {
                //   path:":tag",
                //   name:"soutag",
                //   component:Shangpuinfo
                // }
              ]
            },
            {
              path:"?spin=:sid",
              name:"shangpin",
              component:Danpin,
              // children:[
              //   {
              //     path:'dianpin',
              //     component:PicZoom
              //   }
              // ]
            }
          ]
        },
        {
          path:"sousuos/:cha",
          name:"sousuo",
          component:Sousuos,
          children:[
            {
              path:"",
              name:"sousuo",
              component:Sousuosps
            }
          ] 
        },
        {
          path:"geren",
          component:Geren,
          children:[
            {
              path:"/",
              component:Grindex
            },
            {
              path:"zl",
              component:Grziliao
            },
            {
              path:"dzxg",
              component:Dzxg
            }
          ]
        },
        {
          path:"gwche",
          component:Gwche
        }
      ]
    },
    {
      path:"/login",
      component:Login
    },
    {
      path:'/zhuce',
      component:Zhuce
    },
    {
      path:"/houtai",
      component:Houtai,
      children:[
        {
          path:"tjspin",
          component:Tjspin
        },
        {
          path:"tjspu",
          component:Tjspu
        },
        {
          path:"/",
          component:Llyh
        },
        {
          path:"xgdp",
          component:Xgdp
        },
        {
          path:"dpyilan",
          component:Dpyilan
        }
      ]
    },
    {
      path:"/hdlogin",
      component:Hdlogin
    },
    {
      path:"?a=:sid",
      component:Gc
    }
  ]
})
